<?php

return array(
    'controllers' => array(
        'invokables' => array(
            'Fronts\Controller\Index' => 'Fronts\Controller\IndexController',
            'Fronts\Controller\Elements' => 'Fronts\Controller\ElementsController',
            'Fronts\Controller\Detail' => 'Fronts\Controller\DetailController',
            'Fronts\Controller\Categories' => 'Fronts\Controller\CategoriesController',
            'Fronts\Controller\Search' => 'Fronts\Controller\SearchController',
        ),
    ),
    'router' => array(
        'routes' => array(
            //router Index System
            'indexfronts' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/',
                    'defaults' => array(
                        '__NAMESPACE__' => 'Fronts\Controller',
                        'controller' => 'Fronts\Controller\index',
                        'action' => 'index',
                    ),
                ),
            ),
            //detail videos
            'detailvideos' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/[:cataloglink][/:linkvideos].html',
                    'constraints' => array(
                        'cataloglink' => '[a-zA-Z][a-zA-Z0-9_-]*',
                        'linkvideos' => '[a-zA-Z][a-zA-Z0-9_-]*',
                    ),
                    'defaults' => array(
                        '__NAMESPACE__' => 'Fronts\Controller',
                        'controller' => 'Fronts\Controller\detail',
                        'action' => 'index',
                    ),
                ),
            ),
            //categories videos
            'categories' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/[:cataloglink].html',
                    'constraints' => array(
                        'cataloglink' => '[a-zA-Z][a-zA-Z0-9_-]*',
                    ),
                    'defaults' => array(
                        '__NAMESPACE__' => 'Fronts\Controller',
                        'controller' => 'Fronts\Controller\categories',
                        'action' => 'index',
                    ),
                ),
            ),
            //list catalogId videos
            'listcatalogId' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/scannercatalogid/[:action]',
                    'constraints' => array(
                        'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                    ),
                    'defaults' => array(
                        '__NAMESPACE__' => 'Fronts\Controller',
                        'controller' => 'Fronts\Controller\categories',
                        'action' => 'scannercatalog',
                    ),
                ),
            ),
            //list catalogId videos
            'searchvideos' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/tim-kiem',
                    'defaults' => array(
                        '__NAMESPACE__' => 'Fronts\Controller',
                        'controller' => 'Fronts\Controller\search',
                        'action' => 'search',
                    ),
                ),
            ),
            'listsearch' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/search/[:action]',
                    'constraints' => array(
                        'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                    ),
                    'defaults' => array(
                        '__NAMESPACE__' => 'Fronts\Controller',
                        'controller' => 'Fronts\Controller\search',
                        'action' => 'search',
                    ),
                ),
            ),
        ),
    ),
    'view_manager' => array(
        'display_not_found_reason' => true,
        'display_exceptions' => true,
        'not_found_template' => 'error/404',
        'exception_template' => 'error/index',
        'template_map' => array(
            'error/404' => __DIR__ . '/../view/error/404.phtml',
            'error/index' => __DIR__ . '/../view/error/index.phtml',
        ),
        'template_path_stack' => array(
            __DIR__ . '/../view',
        ),
    ),
    'view_helpers' => array(
        'invokables' => array(
            'action' => 'Eva\View\Helper\Action',
        ),
    ),
);
